home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / zapem-0.000 / zapem-0 / zapem / player.h < prev    next >
C/C++ Source or Header  |  1995-02-22  |  795b  |  41 lines

  1. #ifndef PLAYER_H
  2. #define PLAYER_H
  3.  
  4. /* requires sprite.h, soul.h, weapon.h , entity.h */
  5. #include "action.h"
  6.  
  7. const int NUMLIVES=3;
  8.  
  9. enum rail {FRONT,REAR,PORT,STARBOARD};
  10.  
  11. class
  12. Player : public Entity
  13. {
  14. private:
  15.     action dir;
  16.     animList animLeft, animRight, animStr, animExp;
  17.     Control* controller;
  18.     Weapon* weapon[STARBOARD+1];        
  19.  
  20.     void init(void);
  21.     void copy(const Player& p);
  22.     void moveWeapons(void);
  23. public:
  24.     Player();
  25.         Player(const Player& p);
  26.         Player& operator=(const Player& p);
  27.  
  28.     void setControl( Control* c );
  29.     void setWeapon( Weapon* w, rail r);
  30.     void setDir(action d){dir=d;}
  31.  
  32.     void explode(void);
  33.     void fire(void);
  34.     /* Tests whether mounted weapons have hit anything */
  35.     bool hit( const Sprite& e);
  36.     void control(void);
  37.     action getDir(void) const {return dir;}
  38. };
  39.  
  40. #endif
  41.